﻿using System;
using System.Data;

namespace BizElements.Core.ProviderComponents
{
    /// <summary>Builds <see cref="System.Data.IDbCommand"/> objects.</summary>
    public interface IDbCommandBuilder
    {
        /// <summary>Creates DB command.</summary>
        /// <param name="cmdText">Command text.</param>
        /// <param name="parameters">Command parameters.</param>
        /// <param name="cmdType">Command type (Text, Stored procedure).</param>
        /// <returns>DB command.</returns>
        IDbCommand BuildCommand(string cmdText, DbParameterCollection parameters, CommandType cmdType);
    }
}